<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>subliminal肯定语句转换器</title>
</head>
<body>
    <p>使用说明：把你录制好的sub肯定语句上传，然后进行处理，下载处理好的sub肯定语句音轨，然后在手机或者电脑的音频软件里继续进行处理（因为手机的音频处理软件一般不支持插件，所以通过webaudioAPi来进行处理）</p>
    <h2>教程</h2>
    <ol>
        <li>点击上传</li>
        <li>点击编码</li>
    </ol>
    <p>建议听sub不超过30分钟每天</p>
    <a href="核心原理.html">核心原理</a>

    <input type="file" id="fileInput">上传
    <span>未上传</span>
    <button onclick="encode()">编码</button>
    <button onclick="decode()">解码</button>
    <button onclick="download()">下载</button>
    <script>
        const audioContext = new AudioContext();
        await audioContext.audioWorklet.addModule('subliminal-processor.js');
        const processorNode = new AudioWorkletNode(audioContext, 'subliminal-processor');
        
        var fileInput = document.getElementById("fileInput")
        fileInput.addEventListener("change",function()
        {
            var file = fileInput.files[0]
            console.log(file)
        })
        function upload()
        {

        }
        function encode()
        {
            //processorNode.parameters.get('action').setValueAtTime(0, audioContext.currentTime); // 0=编码 1=解码
        }
        function decode()
        {

        }
        function download()
        {

        }
    </script>
</body>
</html>